package com.game.server.util;

import java.text.SimpleDateFormat;
import com.game.majiang.config.DataManager;
import com.game.majiang.vo.RechargeVo;

public class ZhiFu {
//
//	
//	public  String zhifubao(int userId, Integer gold, Integer shuliang, String string, Integer treminal) {
//		String url ="http://order.z.jtpay.com/jh-web-order/order/receiveOrder";
//		String shimizhifu;
//		String  p1_yingyongnum ="01018046491401";
//		int p3_money;
//		//密钥
//		//String key = "040109141916ze44Mfoy";
//
//		//商户应用号
//		//String p1_yingyongnum = "01018035867501";
//		String p2_ordernumber=UtilDate.getdtlongNum()+UtilDate.getThree();
//		//(new Date()).getTime()+"";
//		SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
//		String key="040109162509lFJBwoqU";
//		String p6_ordertime=UtilDate.getdtlongNum();
//		String p7_productcode;
//		String p8_sign; 
//		int p14_customname;
//		String p16_customip;
//		int p25_treminal;
//		p3_money = gold;
//		p7_productcode="ZFB"; 
//		p14_customname=userId;
//		p16_customip=string;
//		p25_treminal=treminal;
//		// "&p14_customname="+p14_customname+"&p16_customip="+p16_customip+"&p25_treminal="+p25_treminal+
//		//shimizhifu="p1_yingyongnum="+p1_yingyongnum+"&p2_ordernumber="+p2_ordernumber+"&p3_money="+p3_money+"&p6_ordertimeString="+p6_ordertime+"&p7_productcode="+p7_productcode+"&compkey="+key;
//
//		shimizhifu=p1_yingyongnum+"&"+p2_ordernumber+"&"+p3_money+"&"+p6_ordertime+"&"+p7_productcode+"&"+key;
//
//		p8_sign=MD5Tool.encoding(shimizhifu);
//
//		RechargeVo.insertRechargeVo(userId, gold, -1, p2_ordernumber, shuliang);
//		
//		//
//		return DataManager.getInstance().systemValue("domainName")+"/TTXChaguan_admin/right/rechargefasong.jsp?op=rechargefasong&url="+url+"&p8_sign="+p8_sign+"&p14_customname="+p14_customname+"&p16_customip="+p16_customip+"&p25_treminal="
//		+p25_treminal+"&p3_money="+p3_money+"&p2_ordernumber="+p2_ordernumber+"&p7_productcode="+p7_productcode+"&p1_yingyongnum="+p1_yingyongnum+"&p6_ordertime="+p6_ordertime;
//
//	}
//
//	public  String weixing(int userId, Integer gold, Integer shuliang, Integer treminal) {
//		String url ="http://api.unpay.com/PayMegerHandler.ashx";
//		String customerid="300491"; //商户在网关系统上的商户号
//		//String customerid="100000"; //商户在网关系统上的商户号
//		//String key="42C8938E4CF5777700700E642DC2A8CD";//key值请联系商务人员获取
//		String sdcustomno=UtilDate.getdtlongNum()+UtilDate.getThree();//订单在商户系统中的流水号
//		String orderAmount=gold*100+"";//金额,单位分
//		String cardno="41";//支付类型:32(微信扫码),41(微信WAP,微信公众号),42(支付宝),44(支付宝WAP),36(QQ扫码),45(QQ支付WAP)
//		String noticeurl=DataManager.getInstance().systemValue("return_url_weixing");//异步通知地址,不能带任何参数,否则异步通知不会成功
//		String backurl="http://wwww.baidu.com";//付款成功,同步跳转（不带参数）
//		String key="C295DBAD8E8DCFE43607B06DF0AC3F32";//key值请联系商务人员获取
//		String mark="xintianyou";//数字+字母 不能存在中文 例如：test123
//		String remarks="xingtianyou";//简短的中文说明,为空时,取mark
//		String zftype="1";//返回类型 1:直接跳转 2:返回xml 3:返回json
//		String Md5str= "customerid=" + customerid + "&sdcustomno=" + sdcustomno + "&orderAmount=" + orderAmount + "&cardno=" + cardno + "&noticeurl=" + noticeurl + "&backurl=" + backurl + key;
//		String sign=Util.Md5(Md5str).toUpperCase();
//		String gourl=url+"?customerid=" + customerid + "&sdcustomno=" + sdcustomno + "&orderAmount=" + orderAmount + "&cardno=" + cardno + "&noticeurl=" + noticeurl + "&backurl=" + backurl + "&sign=" + sign + "&mark=" + mark + "&remarks=" + remarks + "&zftype="+zftype;
//		RechargeVo.insertRechargeVo(userId, gold, -1, sdcustomno, shuliang);
//		return gourl;
//	}
//
}
